package tests.impl;

import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import auction.Moderator;
import auction.impl.ModeratorImpl;


public class ModeratorImplTest {
	private Moderator moderator;

	@Before
	public void setUp() throws Exception {
		moderator = new ModeratorImpl("John","Connor","terminator@findumonde.com","sauversarah","3,rue du moulin");
	}

	@After
	public void tearDown() throws Exception {
		moderator = null;
	}

	/**
	 * Test du constructeur
	 */
	@Test
	public void testModeratorImpl() {
		boolean b = moderator.getFirstName().equals("John");
		boolean b2 = moderator.getLastName().equals("Connor");
		boolean b3 = moderator.getEmail().equals("terminator@findumonde.com");
		boolean b4 = moderator.getPassword().equals("sauversarah");
		boolean b5 = moderator.getAdress().equals("3,rue du moulin");
		assertTrue(b);
		assertTrue(b2);
		assertTrue(b3);
		assertTrue(b4);
		assertTrue(b5);
	}

	@Test
	public void testGetAdress() {
		boolean b = moderator.getAdress().equals("3,rue du moulin");
		assertTrue(b);
	}

	@Test
	public void testGetEmail() {
		boolean b = moderator.getEmail().equals("terminator@findumonde.com");
		assertTrue(b);
	}

	@Test
	public void testGetFirstName() {
		boolean b = moderator.getFirstName().equals("John");
		assertTrue(b);
	}

	@Test
	public void testGetLastName() {
		boolean b = moderator.getLastName().equals("Connor");
		assertTrue(b);
	}

	@Test
	public void testGetPassword() {
		boolean b = moderator.getPassword().equals("sauversarah");
		assertTrue(b);
	}

}
